<html>
<head><meta charset="utf-8"><title>migration-and-region-errors · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html">migration-and-region-errors</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="130982088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/130982088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#130982088">(Aug 06 2018 at 14:33)</a>:</h4>
<p>ps <span class="user-mention" data-user-id="116083">@pnkfelix</span> and <span class="user-mention" data-user-id="116118">@Matthew Jasper</span> -- regarding <a href="https://github.com/rust-lang/rust/pull/53045" target="_blank" title="https://github.com/rust-lang/rust/pull/53045">https://github.com/rust-lang/rust/pull/53045</a> -- what is current status here? I was thinking that this might be a case where we want to remember that an error <em>would've</em> been reported, but not issue the error eagerly, so that we can report the error from NLL instead.</p>
<p>That said, I don't know how much this matters. I <em>think</em> that until we go to polonius mode (or at least "location-sensitive outlives" constraints), any errors that old regionck would report would <em>probably</em> still be errors in the new code... not sure if we have any counterexamples...</p>



<a name="131005747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131005747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131005747">(Aug 06 2018 at 21:40)</a>:</h4>
<p>Do you mean “what is current status” as in “should we continue to have this filter in the first place?” Ie “what should we do to bring migration mode in line with NLL mode”?</p>



<a name="131005926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131005926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131005926">(Aug 06 2018 at 21:44)</a>:</h4>
<p>I mean "what is current behavior of the code"</p>



<a name="131005932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131005932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131005932">(Aug 06 2018 at 21:44)</a>:</h4>
<p>I believe current behavior is "if in migration mode, report regionck errors as hard errors"</p>



<a name="131005933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131005933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131005933">(Aug 06 2018 at 21:44)</a>:</h4>
<p>correct?</p>



<a name="131005940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131005940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131005940">(Aug 06 2018 at 21:45)</a>:</h4>
<p>(but not in <code>#![feature(nll)]</code> mode)</p>



<a name="131006096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006096">(Aug 06 2018 at 21:49)</a>:</h4>
<p>Yes</p>



<a name="131006102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006102">(Aug 06 2018 at 21:49)</a>:</h4>
<p>That was to fix ... something very bad</p>



<a name="131006182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006182">(Aug 06 2018 at 21:50)</a>:</h4>
<p>It’s possible the right fix would have been to somehow record the (silenced) presence of a regional error in the same manner we do an AST borrowck error</p>



<a name="131006199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006199">(Aug 06 2018 at 21:51)</a>:</h4>
<p>So that we’d know in migration mode that the subsequent NLL error should be a hard error, not downgraded to a warning</p>



<a name="131006207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006207">(Aug 06 2018 at 21:51)</a>:</h4>
<blockquote>
<p>It’s possible the right fix would have been to somehow record the (silenced) presence of a regional error in the same manner we do an AST borrowck error</p>
</blockquote>
<p>right, that's what I'm thinking -- but i'm not sure if it matters anymore</p>



<a name="131006246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006246">(Aug 06 2018 at 21:52)</a>:</h4>
<p>given that we are no longer "location sensitive" for outlives relations</p>



<a name="131006248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006248">(Aug 06 2018 at 21:52)</a>:</h4>
<p>But we <em>will</em> be at some point</p>



<a name="131006250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006250">(Aug 06 2018 at 21:52)</a>:</h4>
<p>it will matter at some point, yes</p>



<a name="131006252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006252">(Aug 06 2018 at 21:52)</a>:</h4>
<p>though I sort of hope to complete the transition first :)</p>



<a name="131006258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006258">(Aug 06 2018 at 21:52)</a>:</h4>
<p>that is, to remove "old regionck"</p>



<a name="131006260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006260">(Aug 06 2018 at 21:52)</a>:</h4>
<p>I was actually wondering while you were on PTO</p>



<a name="131006261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006261">(Aug 06 2018 at 21:52)</a>:</h4>
<p>maybe that is overly ambitious...</p>



<a name="131006274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006274">(Aug 06 2018 at 21:53)</a>:</h4>
<p>How hard would it be to put in a -Z location-sensitive-outlives flag?</p>



<a name="131006293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006293">(Aug 06 2018 at 21:54)</a>:</h4>
<p>Ie i think people would like to be able to test it out</p>



<a name="131006334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006334">(Aug 06 2018 at 21:54)</a>:</h4>
<p>pretty hard at this point</p>



<a name="131006336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006336">(Aug 06 2018 at 21:54)</a>:</h4>
<p>it'd be easier to fix up polonius probably</p>



<a name="131006339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006339">(Aug 06 2018 at 21:54)</a>:</h4>
<p>not sure what current status of that is...</p>



<a name="131006346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006346">(Aug 06 2018 at 21:54)</a>:</h4>
<p>To find out if their code would be accepted under the generalized NLL</p>



<a name="131006362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006362">(Aug 06 2018 at 21:55)</a>:</h4>
<p>it might help us head off a number of people filing bugs against NLL completeness</p>



<a name="131006366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006366">(Aug 06 2018 at 21:55)</a>:</h4>
<p>it'd certainly help in diagnosing them</p>



<a name="131006368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006368">(Aug 06 2018 at 21:55)</a>:</h4>
<p>but it can't readily be done</p>



<a name="131006369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006369">(Aug 06 2018 at 21:55)</a>:</h4>
<p>But .... it also might be such a good feature, people won’t want to stop using it</p>



<a name="131006373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006373">(Aug 06 2018 at 21:55)</a>:</h4>
<p>Okay</p>



<a name="131006374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006374">(Aug 06 2018 at 21:55)</a>:</h4>
<p>though making polonius mode work might be possible...</p>



<a name="131006426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006426">(Aug 06 2018 at 21:56)</a>:</h4>
<p>I wasn’t sure if it would be possible to reverse engineer it from the PR’s that removed it</p>



<a name="131006430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006430">(Aug 06 2018 at 21:56)</a>:</h4>
<p>at this point I ripped out tons of the relevant code</p>



<a name="131006433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131006433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131006433">(Aug 06 2018 at 21:56)</a>:</h4>
<p>and -- to improve perf in various ways -- have refactored a lot of the other related stuff</p>



<a name="131009813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors/near/131009813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/migration-and-region-errors.html#131009813">(Aug 06 2018 at 23:30)</a>:</h4>
<p>I'd love a <code>#[feature(nll-polonius)]</code> for my "will this work in the future" tests. I know it's  a bit flaky, but still</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>